﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using Foothill.Common.Logging;

namespace Foothill.Service.Configuration
{
    public class CustomConfigurationManager : ICustomConfigurationManager 
    {
        private const string _configurationSectionName = "foothill";
        
        public FoothillConfigurationSection GetFoothillConfigurationSection()
        {
            FoothillConfigurationSection custSection = null;

            try
            {
                custSection = (FoothillConfigurationSection)ConfigurationManager.GetSection(_configurationSectionName);
            }
            catch (Exception e)
            {
                Log.Error(FoothillModule.Service, "Failed to load custom configurations", e);
            }

            return custSection;
        }
    }
}
